package com.ssy.lingxi.member.merchant.model.vo.lrc.request;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 更改会员权益参数值接口参数VO
 * @author 万宁
 * @version 2.0.0
 * @date 2020-08-24
 */
public class MemberRightConfigUpdateParamVO implements Serializable {
    private static final long serialVersionUID = 5592625834420827438L;

    /**
     * 权益Id和参数
     */
    @NotEmpty(message = "权益Id和参数数组不能为空")
    private List<ParamItem> items;

    public List<ParamItem> getItems() {
        return items;
    }

    public void setItems(List<ParamItem> items) {
        this.items = items;
    }

    public static class ParamItem implements Serializable {
        private static final long serialVersionUID = -8341134751963952285L;
        /**
         * 权益Id
         */
        @NotNull(message = "权益Id要大于0")
        @Positive(message = "权益Id要大于0")
        private Long id;

        /**
         * 权益参数
         */
        @NotNull(message = "权益参数要大于等于0")
        @PositiveOrZero(message = "权益参数要大于等于0")
        @Max(value = 1000000000, message = "权益参数值不能超过10的9次方")
        private BigDecimal param;

        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }

        public BigDecimal getParam() {
            return param;
        }

        public void setParam(BigDecimal param) {
            this.param = param;
        }
    }


}
